from django.contrib import admin
from .models import Product, Offer


class OfferAdmin(admin.ModelAdmin):
	list_display = ('code', 'discount')


class ProductAdmin(admin.ModelAdmin):
	list_display = ('name', 'price', 'stock')


# 将Product,ProductAdmin 加到后台管理
admin.site.register(Offer, OfferAdmin)
admin.site.register(Product, ProductAdmin)
